package cn.tedu.admin.mall.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 前端页面传给controller
 *  新增 CategoryAddParam
 *  更新 CategoryUpdateParam
 *  统一xxxParam
 *
 *
 */
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class CategoryAddParam implements Serializable {
    @ApiModelProperty("类别名称")
            @NotNull
            @NotBlank
            @NotEmpty
    String name;
    //name 不能为空,长度不能超过5个汉字
    @ApiModelProperty("排序")
    Long sort;
    @ApiModelProperty("是否显示")
    Long isDisplay;
    @ApiModelProperty("父类别id")
    //必须是数字 红茶
    Long parentId;
}
